<template>
	<view class="container">
		<image class="bg-set" src="../../static/swiper/background2.jpg"></image>
		<cu-custom bgColor="bg-blue">
			<block slot="content">学生德育评价平台</block>
		</cu-custom>
		<!-- 原轮播图 -->
		<!-- <swiper class="screen-swiper square-dot bg-blue" :indicator-dots="true" :circular="true" :autoplay="true"
			interval="2000" duration="500">
			<swiper-item v-for="(item,index) in swiperList" :key="index">
				<image :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
				<video :src="item.url" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover"
					v-if="item.type=='video'"></video>
			</swiper-item>
		</swiper> -->
		<van-notice-bar 
			color="#1989fa"
			background="#FFF"
		  left-icon="volume-o"
		  text="欢迎使用大庆师范学院学生德育评价平台。"
		/>
<view class="cu-list menu card-menu height" style="margin:160px 15px 15px 15px; box-shadow: 0px 5px 3px #f2f7fe;" @click="goto('../../subPages/students/students')">
		   <view class="cu-item " :class="menuArrow?'arrow':''" style="height: 80px;"> 
		    <view class="content ">
				<view class="flex  p-xs margin-bottom-sm mb-sm">
					<view class="flex-sub basis-xs margin-xs padding-sm radius">
						<view class="text-sl padding">
						<text class="cuIcon-group text-blue"></text>
						</view>
					</view>
					<view class="flex-twice basis-xs margin-xs padding-sm radius" >
						<!-- <text class="text-black  text-xl padding">申请加分</text> -->
						<image src="../../static/img/shenqingjiafen.jpg"style="height: 41px; width: 154px;"></image>
					</view>
				</view>
				</view>
		   </view>
		  </view>
		<view class="cu-list menu card-menu height" style="margin: 15px; box-shadow: 0px 5px 3px #f2f7fe; " @click="checkout()">
		 <view class="cu-item " :class="menuArrow?'arrow':''" style="height: 80px;"> 
		  <view class="content ">
		 <view class="flex  p-xs margin-bottom-sm mb-sm" style="margin-top: 10px;">
		 	<view class="flex-sub basis-xs margin-xs padding-sm radius">
				<view class="text-sl padding">
				<text class="cuIcon-form text-blue "></text>
				</view>
			</view>
		 	<view class="flex-twice basis-xs margin-xs padding-sm radius">
				 <text class="text-black text-xl padding">年终评价</text>
			</view>
		 </view>
		  </view>
		 </view>
		</view>
			
			<view class="grid col-3 padding-sm" style="margin-top: -7px;">
				<view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 2px #f2f7fe;" @click="goto('../../subPages/task/ApplyList')">
					<navigator hover-class="none" url="/pages/samples/basics/home" style="margin-top: 15px;">
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-my"></text>
							<view class="margin-top-df ">我发起的</view>
						</view>
					</navigator>
				</view>
				<view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 2px #f2f7fe;" @click="goto('../../subPages/deduct/Deduct')">
					<navigator hover-class="none" url="/pages/samples/basics/home" style="margin-top: 3px;">
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-warn"></text>
							<view class="margin-top-df ">我的扣分</view>
						</view>
					</navigator>
				</view>
				<!-- sample页跳转 -->
				<!-- <view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 3px #f2f7fe;" @click="goto('/pages/samples/ucharts/ucharts')"> -->
				<!-- <view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 3px #f2f7fe;" @click="goto('/pages/dia/diagrams')">
					<navigator hover-class="none" url="/pages/samples/ucharts/ucharts">
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-rank"></text>
							<view class="margin-top-sm text-Abc">统计</view>
						</view>
					</navigator>
				</view> -->
				<view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 2px #f2f7fe;"@click="checkLevel()">
					<navigator hover-class="none" url="/pages/samples/plugin/home" >
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-text"></text>
							<view class="margin-top-df ">班级同学得分</view>
						</view>
					</navigator>
				</view>
				<view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 2px #f2f7fe;"@click="goto('../../subPages/apps/mail/mail')">
					<navigator hover-class="none" url="/pages/samples/plugin/home" >
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-mail"></text>
							<view class="margin-top-df ">站内信</view>
						</view>
					</navigator>
				</view>
				<view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 2px #f2f7fe;"@click="goto('../../subPages/apps/notification/notification')">
					<navigator hover-class="none" url="/pages/samples/plugin/home" >
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-notice"></text>
							<view class="margin-top-df ">通告</view>
						</view>
					</navigator>
				</view>
				<view class="padding-sm cu-list menu card-menu height" style="box-shadow: 0px 5px 2px #f2f7fe;"@click="pointOut()">
					<navigator hover-class="none" url="/pages/samples/plugin/home" >
						<view class="padding radius text-center shadow-blur bg-white">
							<text class="lg font-size-35 text-blue cuIcon-rank"></text> 
							<!-- write  appreciatefill  appreciate upstagefill-->
							<view class="margin-top-df ">数据分析</view>
						</view>
					</navigator>
				</view>
		</view>
		<view class="cu-tabbar-height"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuArrow: true,
				// swiperList: [{
				// 	id: 0,
				// 	type: 'image',
				// 	url: '/static/swiper/show1.jpg'
				// },
				// {
				// 	id: 2,
				// 	type: 'image',
				// 	url: '/static/swiper/show4.jpg'
				// },
				// {
				// 	id: 4,
				// 	type: 'image',
				// 	url: '/static/swiper/show6.jpg'
				// }
				// ],
				cardCur: 0,
				dataList: [],
				categoryList: [],
				processMap: new Map(),
				dotStyle: false,
				towerStart: 0,
				direction: ''
			};
		},
		methods: {
			checkout () {
				this.$http.get('/handwritingtime/handwritingTime/getAttachedTimeZone').then(({data}) => {
				  if (data && data.success) {
					if (data.pausetimeZon === true){
						this.goto('../../subPages/evaluate/evaluate')
					}else{
						uni.showToast({
							icon:"none",
							title:"未到评价时间，请等待！"
						})
					}
				  }
				})
			},
			pointOut () {
				uni.showToast({
					icon:"none",
					title:"该功能正在抓紧研发中，请耐心等待！"
				})
			},
			//跳转
			checkLevel(){
				this.$http.get('/sys/user/info').then(({data}) => {
					var __this = this
					if (data && data.success) {
						if (data.role.length>=2){
							uni.showToast({
								title: '请您使用电脑端进入该模块',
								icon:'none',
								duration: 2000
							});
						} else {
							__this.goto('../../subPages/ucharts/ucharts')
						}
					}
				})
			},
			goto (path) {
				uni.navigateTo({
					url:path
				})
			}
		}
	}
</script>

<style>
	.bg-set{
	    position: fixed;
	    width: 100%;
	    height: 100%;
	    top: 0;
	    left: 0;
	    z-index: -1;
	}
	.cu-list.card-menu {
		overflow: hidden;
		margin-right: 0px;
		margin-left: 0px;
		border-radius: 7px;
	}

	.cu-list.card-menu.margin-top-20 {
		margin-top: -20px;
	}

	.cu-list.menu>.cu-item .content>uni-view:first-child {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		/* -webkit-align-items: center; */
		/* align-items: center; */
		display: inline-block;
		margin-right: 5px;
		width: 1.6em;
		text-align: center;
	}

	.font-size-35 {
		font-size: 35px !important;
	}

	.circle-button {
		width: 44px;
		height: 44px;
		border-radius: 18px;
		padding-top: 4px;
	}

	.circle-button-box {
		width: 25%;
		margin-top: 10px;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		flex-direction: column;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		-webkit-box-pack: center;
		-webkit-justify-content: center;
		justify-content: center;
		box-sizing: border-box;
	}

	.font-b {
		vertical-align: middle;
		font-size: 18px;
		font-weight: 500;
		color: #3a3a3a;
	}
</style>
